#pragma once
#include <game/Config.h>
#include <game/Service.h>

#include <string>

ARELLO_GAME_NAMESPACE_DECL_START
namespace services {

class ScreenSwitcher
	: public Service<ScreenSwitcher>
{
public:
	/** Schedules screen switch.
	*
	*	After current life cycle ends, switches current screen to the one with the given id.
	*
	*	Id's are context-dependent and are specified in the flow definition.
	*
	*	If useLoadingScreen is true, old screen will be destroyed immediately and loading screen will 
	*	appear until next one isn't loaded
	*/
	virtual void ScheduleSwitch(const std::string& exitId, bool useLoadingScreen = false) = 0;
	
	/** Schedules screen switch with clearing screens stack before.
	 *
	 *	After current life cycle ends, switches current screen to the one with the given id.
	 *  All screens pushed into stack will be removed also.
	 *
	 *	Id's are context-dependent and are specified in the flow definition.
	 *
	 *	useLoadingScreen does the same as in ScheduleSwitch function.
	 */
	virtual void ScheduleClearAndSwitch(const std::string& exitId, bool useLoadingScreen = false) = 0;
	
	/** Schedules screen switch with pushing previous screen into stack.
	 *
	 *	After current life cycle ends, switches current screen to the one with the given id.
	 *  Previous screen will be saved in screens stack and can be switched back with '#Pop' exit id.
	 *
	 *	Id's are context-dependent and are specified in the flow definition.
	 */
	virtual void SchedulePush(const std::string& exitId) = 0;
	
	/** Schedules screen restart.
	 *
	 *	After current life cycle ends, restarts current screen.
	 */
	virtual void ScheduleRestart() = 0;
};

} // namespace services
ARELLO_GAME_NAMESPACE_DECL_END